home *** CD-ROM | disk | FTP | other *** search
/ Amiga Game-Power / Amiga Game-Power.iso / pd mix ii / access / thai / quiz.h < prev    next >
C/C++ Source or Header  |  1994-05-20  |  2KB  |  118 lines

  1.  
  2. #include <exec/types.h>
  3. #include <intuition/intuition.h>
  4. #include "thaichars.h"
  5.  
  6. #define MAX_STRING            256
  7.  
  8.  
  9. #define CHOOSE_SENTENCE        0
  10. #define SPEAK_SENTENCE        1
  11. #define THAI_SENTENCE        2
  12. #define PHONETIC_SENTENCE    3
  13. #define ENGLISH_SENTENCE    4
  14. #define RIGHT_SENTENCE        5
  15. #define WRONG_SENTENCE        6
  16. #define ADD_SENTENCE        7
  17. #define DEL_SENTENCE        8
  18. #define TS_SEARCH            9
  19. #define PS_SEARCH            10
  20. #define ES_SEARCH            11
  21. #define CHOOSE_WORD            12
  22. #define SPEAK_WORD            13
  23. #define THAI_WORD            14
  24. #define PHONETIC_WORD        15
  25. #define ENGLISH_WORD        16
  26. #define RIGHT_WORD            17
  27. #define WRONG_WORD            18
  28. #define ADD_WORD            19
  29. #define DEL_WORD            20
  30. #define TW_SEARCH            21
  31. #define PW_SEARCH            22
  32. #define EW_SEARCH            23
  33. #define NEXT_ENTRY            24
  34. #define PREV_ENTRY            25
  35. #define TS_ENTRY            26
  36. #define PS_ENTRY            27
  37. #define ES_ENTRY            28
  38. #define TW_ENTRY            29
  39. #define PW_ENTRY            30
  40. #define EW_ENTRY            31
  41. #define TRANSLATE_SENTENCE    32
  42. #define TRANSLATE_WORD        33
  43. #define REPLACE_SENTENCE    34
  44. #define    REPLACE_WORD        35
  45.  
  46. #define NUM_CMDS            36
  47.  
  48.  
  49. #define TSBASEX        86
  50. #define TSBASEY        81
  51. #define TSHEIGHT    22
  52. #define TSWIDTH        484
  53.  
  54. #define TWBASEX        86
  55. #define TWBASEY        148
  56. #define TWHEIGHT    22
  57. #define TWWIDTH        484
  58.  
  59.  
  60. struct thai_phrase {
  61.     char *thai;
  62.     char *phonetic;
  63.     char *english;
  64.     int right;
  65.     int wrong;
  66.     struct thai_phrase *next;
  67.     struct thai_phrase *prev;
  68. };
  69.  
  70.  
  71. #define FP        1
  72. #define BP        0
  73.  
  74. extern struct thai_phrase *chosen_sentence;
  75. extern struct thai_phrase *chosen_word;
  76.  
  77. #define SHOW_THAI        1
  78. #define SHOW_PHONETIC    2
  79. #define SHOW_ENGLISH    4
  80.  
  81. extern int show_sentence;
  82. extern int show_word;
  83.  
  84. extern int entry;    /* TW_ENTRY or TS_ENTRY for thai text entry */
  85.  
  86. extern struct thai_phrase screen_sentence;
  87. extern struct thai_phrase screen_word;
  88.  
  89. extern int file_changed;
  90. extern struct thai_phrase word_head;
  91. extern struct thai_phrase sentence_head;
  92.  
  93. extern struct thai_phrase *split_words[];
  94. extern int num_split_words;
  95. extern int cur_split_word;
  96.  
  97. extern int scanning;
  98. extern struct thai_phrase scan;
  99.  
  100. extern char *wordptr;
  101.  
  102. extern struct Window *window;
  103. extern struct TextFont *thai_font;
  104. extern struct TextAttr thai_textattr;
  105.  
  106. extern struct Gadget CmdGadget[];
  107.  
  108.  
  109. extern struct thai_phrase *thai_search ();
  110. extern struct thai_phrase *phonetic_search ();
  111. extern struct thai_phrase *english_search ();
  112. extern char *translate ();
  113. extern char *malloc ();
  114. extern char *strsave ();
  115. extern char *split_sentence ();
  116.  
  117. extern LONG TextLength ();
  118.